package com.lonely.fx.tree_table_view.entity;

import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleDoubleProperty;
import javafx.beans.property.SimpleIntegerProperty;
import javafx.beans.property.SimpleStringProperty;

/**
 * @date: 2022-08-04 16:58
 * @author: ztkj-hzb
 * @description:
 **/
public class Person {

    /**
     * 名称
     */
    private SimpleStringProperty name = new SimpleStringProperty();

    /**
     * 年龄
     */
    private SimpleIntegerProperty age = new SimpleIntegerProperty();

    /**
     * 进度
     */
    private SimpleDoubleProperty progress = new SimpleDoubleProperty();

    /**
     * 是否合格
     */
    private SimpleBooleanProperty pass = new SimpleBooleanProperty();


    public Person() {
    }

    public Person(String name, Integer age, Double progress, Boolean pass) {
        this.name.set(name);
        this.age.set(age);
        this.progress.set(progress);
        this.pass.set(pass);
    }

    public String getName() {
        return name.get();
    }

    public SimpleStringProperty nameProperty() {
        return name;
    }

    public void setName(String name) {
        this.name.set(name);
    }

    public int getAge() {
        return age.get();
    }

    public SimpleIntegerProperty ageProperty() {
        return age;
    }

    public void setAge(int age) {
        this.age.set(age);
    }

    public double getProgress() {
        return progress.get();
    }

    public SimpleDoubleProperty progressProperty() {
        return progress;
    }

    public void setProgress(double progress) {
        this.progress.set(progress);
    }

    public boolean isPass() {
        return pass.get();
    }

    public SimpleBooleanProperty passProperty() {
        return pass;
    }

    public void setPass(boolean pass) {
        this.pass.set(pass);
    }

    @Override
    public String toString() {
        return "Person{" +
                "name=" + name +
                ", age=" + age +
                ", progress=" + progress +
                ", pass=" + pass +
                '}';
    }
}
